import { observer } from 'mobx-react-lite'

function TodoCompleted ({ todo }) {
  const { modifyTodoIsCompleted, isCompleted } = todo
  return (
    <input
      checked={isCompleted}
      onChange={modifyTodoIsCompleted}
      className='toggle'
      type='checkbox'
    />
  )
}

export default observer(TodoCompleted)
